<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
    var doc = document.implementation.createHTMLDocument("");
    doc.head.innerHTML = "<style>span { background: url(fail) }</style>";
    var rule = doc.head.firstChild.sheet.cssRules[0];

    test(() => {
        assert_equals(rule.style.background, 'url("fail")');
    }, "Check initial background url.");

    test(() => {
        rule.style.setProperty("background", "url(pass)");
        assert_equals(rule.style.background, 'url("pass")');
    }, "Setting background to a relative url should change its value.");
</script>
